import { axios } from '@/utils/request'

/**
 * 查询库存明细
 *
 * @author Eric
 * @date 2021-04-04 08:55:37
 */
export function stockPage (parameter) {
  return axios({
    url: '/stock/page',
    method: 'get',
    params: parameter
  })
}

/**
 * 查询库存明细
 *
 * @author Eric
 * @date 2021-04-04 08:55:37
 */
export function stockHistoryPage (parameter) {
  return axios({
    url: '/stockHistory/page',
    method: 'get',
    params: parameter
  })
}

/**
 * 根据条码号查询库存
 *
 * @author Eric
 * @date 2021-04-12 19:33:11
 */
export function selectByBarcode (barcode) {
  return axios({
    url: '/stock/selectByBarcode',
    method: 'get',
    params: {
      barcode: barcode
    }
  })
}

/**
 * 总览
 *
 * @author Eric
 * @date 2021-04-04 08:55:37
 */
export function overview (parameter) {
  return axios({
    url: '/stock/overview',
    method: 'get',
    params: parameter
  })
}

/**
 * 库龄
 *
 * @author Eric
 * @date 2021-04-04 08:55:37
 */
export function timeAnalysis (parameter) {
  return axios({
    url: '/stock/timeAnalysis',
    method: 'get',
    params: parameter
  })
}
